package zhjb.platform.web.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import ognl.OgnlRuntime;

import org.springframework.web.context.support.WebApplicationContextUtils;

import zhjb.platform.util.SpringUtil;

public class ApplicationListener implements ServletContextListener {

	public void contextDestroyed(ServletContextEvent arg0) {

	}

	public void contextInitialized(ServletContextEvent servletContextEvent) {
		OgnlRuntime.setSecurityManager(null);
		SpringUtil.setWac(WebApplicationContextUtils.getWebApplicationContext(servletContextEvent.getServletContext()));
	}

}
